package com.test.study.loadblance;

import java.util.List;

/**
 * @ClassName AbstractLoadBlance
 * @Description TODO
 * @Author USER
 * @Date 2019/7/12 16:12
 * @Company
 **/
public abstract class AbstractLoadBlance implements ILoadBlance {
    @Override
    public String selectService(List<String> services) {
        if(null!=services && services.size()>0){
            if(services.size()==1){
                return services.get(0);
            }
            return doSelectService(services);
        }
        return null;
    }

    abstract String doSelectService(List<String> services);
}
